package org.jeecg.modules.demo.com.kunpeng.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.com.kunpeng.service.IOaStepService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags="OA项目阶段表")
@RestController
@RequestMapping("/com.kunpeng/oaProjectPhase")
@Slf4j
public class OaStepController {

    @Autowired
    private IOaStepService oaStepService;

    /**
     * 根据actionId获取项目阶段
     * @param
     * @return
     */
    @ApiOperation(value = "OA项目阶段表-获取项目阶段",notes = "OA项目阶段表-获取项目阶段")
    @GetMapping(value = "/saveOaProjectPhase")
    public Result<List<String>> saveOaProjectPhase(Integer actionId){
        List<String> projectPhaseList = oaStepService.listOaStepById(actionId);
        return Result.ok(projectPhaseList);
    }
}
